#ifndef PROCEDURE_H
#define PROCEDURE_H
#include <iostream>
#include <map>
#include <vector>
using namespace std;
class Frame;
class Procedure
{
public:
    string _expr();
    vector<string> _formals();
    friend ostream &operator<<(ostream &os, Procedure v);
    const string type;
    Procedure(string _type, string expr = "", vector<string> formals = {},Frame* env=nullptr) : type(_type), expr(expr), formals(formals),env(env) {}
    Procedure() : type("None") {}
    bool typeIs(string a);
    Frame* makeCallFrame(vector<Procedure*> args);

private:
    string expr;
    vector<string> formals;
    Frame* env;
};

ostream &operator<<(ostream &os, Procedure v);

class Var : public Procedure
{
    friend ostream &operator<<(ostream &os, Procedure v);

public:
    Var(string expr,Frame* env) : Procedure("Var", expr,{},env){}

private:
};

class Function : public Procedure
{
    friend ostream &operator<<(ostream &os, Procedure v);

public:
    Function(string _expr, vector<string> _formals,Frame* env) : Procedure("Func", _expr, _formals,env){}

private:
};
#endif